/* 全局样式规范 */

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  font-size: 14px;
  line-height: 1.5;
  color: #2c3e50;
  background-color: #f8f9fa;
}

/* Element Plus 主题定制 */
:root {
  --el-color-primary: #42b983;
  --el-color-success: #67c23a;
  --el-color-warning: #e6a23c;
  --el-color-danger: #f56c6c;
  --el-color-info: #909399;
}

/* 卡片样式 */
.card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  background-color: #f8f9fa;
}

.card-title {
  margin: 0;
  font-size: 18px;
  color: #2c3e50;
}

.card-body {
  padding: 20px;
}

/* 加载状态 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: #42b983;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(66, 185, 131, 0.3);
  border-top: 3px solid #42b983;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 错误状态 */
.error {
  padding: 16px;
  margin-bottom: 20px;
  background-color: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 4px;
  color: #ff4d4f;
}

/* 成功状态 */
.success {
  padding: 16px;
  margin-bottom: 20px;
  background-color: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 4px;
  color: #52c41a;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  list-style: none;
}

.page-item {
  margin: 0 2px;
}

.page-link {
  display: block;
  padding: 8px 12px;
  color: #42b983;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s;
}

.page-link:hover {
  background-color: #f8f9fa;
}

.page-item.active .page-link {
  background-color: #42b983;
  border-color: #42b983;
  color: #fff;
}

.page-item.disabled .page-link {
  color: #95a5a6;
  background-color: #fff;
  border-color: #ddd;
  cursor: not-allowed;
}

/* 响应式工具类 */
@media (max-width: 768px) {
  .hidden-xs {
    display: none !important;
  }

  .text-center-xs {
    text-align: center;
  }

  .pull-right-xs {
    float: right;
  }
}

@media (min-width: 769px) {
  .visible-xs {
    display: none !important;
  }
}

/* 动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s;
}

.fade-enter,
.fade-leave-to {
  opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
  transition: all 0.3s;
}

.slide-enter,
.slide-leave-to {
  transform: translateX(20px);
  opacity: 0;
}
